#{extends 'main.html' /}
#{set title:'Auteur' /}


<div class="form">	    
	    
	    <h3 class="bigtitle">${author.name} ${author.firstname}</h3>
	   	
	   	*{ BOOK }*
	   	#{if bookList.size() > 0}
		   	#{paginate.controls items:bookList /} 
		    #{paginate.summary items:bookList /}
		    <table class="table_gridview">
			    <tr>
			    	<th>Série</th>
			    	<th>Titre</th>
			    	<th>Editeur</th>
			    	<th>Année de parution</th>
			    </tr>
			    #{paginate.list items:bookList, as:'book'} 
		    		<tr class="${book_parity}">
		    			<td>
		    			#{if book.collection != null}
		    				<a href="@{bookmngt.bookincollection(book.collection.id)}">
		    					${book.collection.title}
		    				</a>
		    			#{/if}
		    			</td>
		    			<td>
		    				<a href="@{bookmngt.displayone(book.id)}">
		    					${book.title}
		    				</a>
		    			</td>
		    			<td>#{if book.publisher != null}${book.publisher.firstname} ${book.publisher.name}#{/if}</td>
		    			<td>${book.year}</td>
		    		</tr>
			    #{/paginate.list}
			</table>
	   	#{/if}
	   	
	   	*{ CARTOON }*
	    #{if cartoonList.size() > 0}
		   	#{paginate.controls items:cartoonList /} 
		    #{paginate.summary items:cartoonList /}
		    <table class="table_gridview">
			    <tr>
			    	<th>Série</th>
			    	<th>Titre</th>
			    	<th>#{if isCartoonist}Auteur#{/if}#{else}Dessinateur#{/else}</th>
			    	<th>Année de parution</th>
			    </tr>
			    #{paginate.list items:cartoonList, as:'book'} 
		    		<tr class="${book_parity}">
		    			<td>
		    			#{if book.collection != null}
		    				<a href="@{bookmngt.bookincollection(book.collection.id)}">
		    					${book.collection.title}
		    				</a>
		    			#{/if}
		    			</td>
		    			<td>
		    				<a href="@{cartoonmngt.displayone(book.id)}">
		    					${book.title}
		    				</a>
		    			</td>
		    			<td>
		    				#{if isCartoonist}${book.writer.firstname} ${book.writer.name}#{/if}
		    				#{else}${book.cartoonist.firstname} ${book.cartoonist.name}#{/else}
		    			</td>
		    			<td>${book.publicationdate}</td>
		    		</tr>
			    #{/paginate.list}
			</table>
	   	#{/if}
	    
</div>
	    